
********************************************************************************************************
*THIS DO-FILE REPLICATES TABLES 2 IN:                                                  			   
* PATRICIA FUNK: 							                       	
* "HOW ACCURATE ARE SURVEYED PREFERENCES FOR PUBLIC POLICIES? EVIDENCE FROM
* A UNIQUE INSTITUTIONAL SETUP"                                                                                         
********************************************************************************************************

global data ="[your path]"
global results ="[your path]"

clear all
set more off
set matsize 2000


use "$data\VOX_prepared", clear 


preserve

duplicates drop votenr, force

areg survey_bias_weighteda  cooprate, absorb(year) cluster(datum_id)
outreg2 using "$results\tab2.xls", se 


areg survey_bias_weighteda  revrate, absorb(year) cluster(datum_id)
outreg2 using "$results\tab2.xls", se append 

**r-squared without fixed effects

*xtset year
*xtreg survey_bias_weighteda  revrate, fe robust

areg survey_bias_weighteda cooprate  revrate, absorb(year) cluster(datum_id)
outreg2 using "$results\tab2.xls", se append 

areg survey_bias_weighteda  turnoutgap, absorb(year) cluster(datum_id)
outreg2 using "$results\tab2.xls", se append 
 
*xtset year
*xtreg survey_bias_weighteda  turnoutgap, fe robust 
 
areg survey_bias_weighteda cooprate  revrate turnoutgap, absorb(year) cluster(datum_id)
outreg2 using "$results\tab2.xls", se append 

restore


